<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"  %>
<!DOCTYPE HTML>
<html >
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" media="all" />
	<style type="text/css">
		#container{
			margin-top:50px;
		}
	</style>
</head>
<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container">
				<a href="#" class="brand" style="color:#fff">Kaishengit PMS</a>
			</div>
		</div>
	</div>
	<div class="container" id="container">
		<div class="row">
			<div class="span3">
				<div class="well" style="padding:8px 0;">
					<ul class="nav nav-list">
						<li class="nav-header" style="padding-top:0px">新Apple总部项目</li>
						<li class="divider"></li>
						<li ><a href="#"><i class="icon-white icon-home"></i>最新动态</a></li>
						<li><a href="goal.html"><i class="icon-flag"></i>目标</a></li>
						<li><a href="#"><i class="icon-folder-open"></i>资料库</a></li>
						<li><a href="#"><i class="icon-file"></i>文件共享</a></li>
						<li class="active"><a href="#"><i class="icon-user"></i>联系人</a></li>
						<li><a href="#"><i class="icon-fire"></i>想法</a></li>
						<li><a href="#"><i class="icon-warning-sign"></i>Bug</a></li>
						<li><a href="#"><i class="icon-cog"></i>项目设置</a></li>
					</ul>
				</div>
			</div>
			<div class="span9">
				<ul class="breadcrumb" style="border-radius:3px 3px 0 0;margin-bottom:0px">
					<li><a href="task.html" style="color:#000"><i class="icon-user"></i>联系人</a></li>
				</ul>
				<div class="wall" style="height:500px;border:1px solid #ccc;border-top:none;">
					<div class="row">
						<div class="span3" style="margin-top:15px;margin-left:35px;">
							<a class="btn span2" href="project.jspx?m=newContact" style="color:#000"><i class="icon-plus"></i>添加联系人</a>
							
							<ul class="unstyled" style="margin-top:40px;">
								<c:forEach items="${contactList }" var="c"> 
									<li style="line-height:30px"><i class="icon-list-alt"></i><a  href="project.jspx?m=contact&id=${c.id}">${c.name}</a></li>
								</c:forEach>
							</ul>
						</div>
						
						<c:if test="${!(empty contact)}">
							<div class="span5" style="height:470px;padding-left:10px;border-left:1px solid #ccc;margin-top:15px;">
								<div class="row">
									<div class="span3">
										<address>
										<h3>${contact.name }</h3>
										<p>${contact.companyname }</p>
										手机&nbsp;${contact.mobile }<br/>
										固话&nbsp;${contact.tel } <p><br />
										邮箱&nbsp;${contact.email }<br/>
										地址&nbsp;${contact.address }
										</p>
										主页 <a href="http://www.kaishengit.com">${contact.website }</a><br/>
										微博 <a href="${contact.weibo }">@${contact.weiboname}</a><br />
										</address>
									</div>
									<div >
										<img style="height:140px;width:140px" alt="" src="project.jspx?m=showCode&id=${contact.id }">
									</div>
								</div>
								
							
								
								<div class="line" style="border-bottom:1px solid #eee;margin-bottom:5px;">记录</div>
								<c:choose>
									<c:when test="${empty cnList }">
										没有记录	<br/>
									</c:when>
									<c:otherwise>
										<c:forEach items="${cnList }" var="cn">
											<blockquote>
												${cn.content }
												<small>${cn.employee.username }发布于 ${cn.createtime}</small>
											</blockquote>
										</c:forEach>
										
									</c:otherwise>
								</c:choose>
							
								<a href="project.jspx?m=contactnote&id=${contact.id}">查看所有记录</a>
								<br/>
								<br/>
								<br/>
								<a href="project.jspx?m=editcontact&id=${contact.id }" class="btn btn-primary"><i class="icon-pencil icon-white"></i>编辑</a>
								<a href="project.jspx?m=delcontact&id=${contact.id }" class="btn btn-danger"><i class="icon-trash icon-white"></i>删除</a>
							</div>
						</c:if>
						
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" >
		$(document).ready(function(){
			
			
		});
	</script>
</body>
</html>